{% extends 'users/base.html' %}
{% load common_extras %}
{% load static %}
{% block link %}
    <link rel="stylesheet" href="{% static 'css/users/user_centre.css' %}">
{% endblock %}
{% block title %}
    {{ username|capfirst }}我的记录
{% endblock %}
{% block header %}
    {% include 'function/header.html' %}
{% endblock %}
{% block main %}
    {% if records %}
        <ul class="fun">
            {% for record in records %}
                <b class="creat">
                    <a href="/fun/record/{{ record.id }}">
                        <div class="left">
                            <img class="img" src="/static/media/{{ record.picture }}" alt="图片溜走了">
                        </div>
                        <div class="right">
                            <h4 class="h4">{{ forloop.counter }}、{{ record.title }}</h4>
                            <p class="desc">{{ record.description }}</p>
                            <p class="time">
                                发布时间：{{ record.create_time|time_since }}
                            </p>
                        </div>
                    </a>
                    <b class="update">
                        <a class="left" href="update/{{ record.id }}">编辑</a>
                        <a class="right" href="delete/{{ record.id }}">删除</a>
                    </b>
                    <h2>&emsp;</h2>
                    <h2>&emsp;</h2>
                </b>
                {% if forloop.last %}
                    <div class="bottom-info">------</div>
                {% endif %}
            {% endfor %}
        </ul>
    {% else %}
        <div class="bottom-info">暂无文章~</div>
    {% endif %}
{% endblock %}